package com.cl.schedule.entity;

import com.cl.mvc.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import java.util.HashMap;
import java.util.Map;

@Getter
@Setter
@DynamicUpdate
@DynamicInsert
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public class ScheduleEntity extends BaseEntity {
    @ApiModelProperty("名称")
    private String name;
    @ApiModelProperty("定时表达式")
    private String cron;
    @ApiModelProperty("是否开启")
    private Integer isOpen;
    @Transient
    private Map<String,Object> params = new HashMap<>();

}
